import request from '@/utils/request'

//获取标签列表
export const getTagsListApi = (params) => request({
    url: '/tags',
    params,
})

//新增标签
export const addTagsApi = (data) => request({
    url: '/tags',
    method: 'post',
    data,
})
//删除标签
export const delTagsApi = id => request({
    url: '/tags/' + id,
    method: 'delete',
})

//获取标签详情
export const getTagsInfoApi = (id) => request({
    url: '/tags/' + id
})
//修改标签
export const editTagsApi = data => request({
    url: '/tags/' + data.id,
    method: 'put',
    data,
})

//修改标签状态
export const editTagsStateApi = data => request({
    url: '/tags/' + data.id + '/' + data.state,
    method: 'post',
})